import './App.scss'
import React from 'react';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'
import Loading from './components/Loading'
const Login=React.lazy(()=>import('./pages/Login'))
const Layout=React.lazy(()=>import('./pages/Layout'))

function App() {
  return (
    <Router>
      <React.Suspense fallback={<Loading></Loading>}>
       <Switch>
          <Route path='/login' component={Login}></Route>
          <Route path='/' component={Layout}></Route>
          
       </Switch>
       </React.Suspense>
    </Router>
  )
}

export default App
